<html><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>GrabImage</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="4">GrabImage()</font></b></p>
<p><b>语法</b></p><blockquote>

Result = <font color="#006666"><b>GrabImage</b></font>(#Image1, #Image2, x, y, Width, Height)</blockquote>

</blockquote>
<b>概要</b><br><blockquote>



Create a new image with the selected area on the source image. 

 

</blockquote><p><b>参数</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>#Image1</i></td>
<td width="90%"> 
 
The source image. 

 

</td></tr>
<tr><td><i>#Image2</i></td>
<td> 
 
A number to identify the new image. <a href="../reference/purebasic_objects.html">#PB_Any</a> can be specified to 
auto-generate this number. 
<br>
<br>
Note: The number of an existing image created using <font color="#924B72">#PB_Any</font> can not be used as the target image. 
Instead, the existing image must be freed and a new number generated by passing <font color="#924B72">#PB_Any</font> here. 

 

</td></tr>
<tr><td><i>x, y, Width, Height</i></td>
<td> 
 
The location and size of the area to copy into the new image. 

 

</td></tr>
</table>
</blockquote><p><b>返回值</b></p><blockquote>



Returns nonzero if the image was created successfully and zero if the image could not be created. 
If <font color="#924B72">#PB_Any</font> was specified as the #Image2 parameter then the auto-generated number is returned on success. 

 

</blockquote><p><b>参阅</b></p><blockquote>

<a href="createimage.html">CreateImage()</a>, <a href="loadimage.html">LoadImage()</a>, <a href="catchimage.html">CatchImage()</a>, <a href="copyimage.html">CopyImage()</a> 

</Blockquote><p><b>已支持操作系统 </b><Blockquote>所有</Blockquote></p><center>&lt;- <a href=freeimage.html>FreeImage()</a> - <a href=index.html>Image Index</a> - <a href=imagedepth.html>ImageDepth()</a> -&gt;



</body></html>